package com.asset.salesforce.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@SuppressWarnings("serial")
@Entity
@Table(name="update_chatter")
public class UpdateChatter implements Serializable{

	private Integer id;
	private String followType;
	private String updateType;
	private Integer followedId;
	private Date date;
	private Employee action_emp;
	
	private Post post;
	/**
	 * @return the id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="update_chatter_id_seq")
	@SequenceGenerator(name="update_chatter_id_seq",sequenceName="update_chatter_id_seq",allocationSize=1)
	public Integer getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * @return the followType
	 */
	
	@Column(name="follow_type")
	public String getFollowType() {
		return followType;
	}
	/**
	 * @param followType the followType to set
	 */
	public void setFollowType(String followType) {
		this.followType = followType;
	}
	/**
	 * @return the updateType
	 */
	
	@Column(name="update_type")
	public String getUpdateType() {
		return updateType;
	}
	/**
	 * @param updateType the updateType to set
	 */
	public void setUpdateType(String updateType) {
		this.updateType = updateType;
	}

	/**
	 * @return the followedId
	 */
	@Column(name="followed_id")
	public Integer getFollowedId() {
		return followedId;
	}
	/**
	 * @param followedId the followedId to set
	 */
	public void setFollowedId(Integer followedId) {
		this.followedId = followedId;
	}
	/**
	 * @return the date
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="date")
	public Date getDate() {
		return date;
	}
	/**
	 * @param date the date to set
	 */
	public void setDate(Date date) {
		this.date = date;
	}
	/**
	 * @return the action_emp
	 */
	@ManyToOne
	@JoinColumn(name="action_emp_id")
	public Employee getAction_emp() {
		return action_emp;
	}
	/**
	 * @param action_emp the action_emp to set
	 */
	public void setAction_emp(Employee action_emp) {
		this.action_emp = action_emp;
	}
	/**
	 * @return the post
	 */
	@OneToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="post_id")
	public Post getPost() {
		return post;
	}
	/**
	 * @param post the post to set
	 */
	public void setPost(Post post) {
		this.post = post;
	}
	

	
	
	
}
